package com.shenchuangit.rydemo.web.leaveappr.service;

import com.shenchuangit.rydemo.web.leaveappr.domain.LeaveApplication;
import org.activiti.engine.history.HistoricTaskInstance;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * 请假申请Service接口
 *
 * @author liuyu
 * @date 2022-01-07
 */
public interface ILeaveApplicationService {
    /**
     * 查询请假申请
     *
     * @param id 请假申请ID
     * @return 请假申请
     */
    public LeaveApplication selectLeaveApplicationById(Long id);

    /**
     * 查询请假申请列表
     *
     * @param leaveApplication 请假申请
     * @return 请假申请集合
     */
    public List<LeaveApplication> selectLeaveApplicationList(LeaveApplication leaveApplication);

    /**
     * 新增请假申请
     *
     * @param leaveApplication 请假申请
     * @return 结果
     */
    public int insertLeaveApplication(LeaveApplication leaveApplication);

    /**
     * 修改请假申请
     *
     * @param leaveApplication 请假申请
     * @return 结果
     */
    public int updateLeaveApplication(LeaveApplication leaveApplication);

    /**
     * 批量删除请假申请
     *
     * @param ids 需要删除的请假申请ID
     * @return 结果
     */
    public int deleteLeaveApplicationByIds(Long[] ids);

    /**
     * 删除请假申请信息
     *
     * @param id 请假申请ID
     * @return 结果
     */
    public int deleteLeaveApplicationById(Long id);

    LeaveApplication selectByInstanceId(String instanceId);

    /**
     * 提交工作流
     */
    public int submit(LeaveApplication afterRentCheck);

    List<LeaveApplication> selectByHistoricTaskInstancePage(Page<HistoricTaskInstance> historicTaskInstancePage);
}
